#include "Owner.h"

int main(){
	//kamus lokal
	nodeList NL;
	ownerList O;
	ownerAddress Z; ownerAddress Y;
	//algoritma
	NL=CreateEmptyNodeList();
	AddNode(&NL,AllocateNode(CharToString("A"), 0.05,0.05, 0.05, 0.05, true,true));
	AddNode(&NL,AllocateNode(CharToString("B"), 0.03,0.02, 0.03, 0.02, false,true));
	
	O = CreateEmptyOwnerList();
	Z=AllocateOwnerList(SearchNodeByName(&NL,CharToString("A")));
	AddOwner(&O,Z);
	Y=AllocateOwnerList(SearchNodeByName(&NL,CharToString("B")));
	AddOwner(&O,Y);
	puts("PRINT");
	PrintListOwner(O);
	
	printf("\n");
	printf("Menghapus isi list O\n");
	DestroyOwnerList(&O);
	PrintListOwner(O); puts("-");
	
	return 0;
}
